package com.aiti.lulian.mapper;

import com.aiti.base.core.base.mapper.SuperMapper;
import com.aiti.lulian.dto.CustomerManagementDto;
import com.aiti.lulian.entity.CustomerManagement;
import com.aiti.lulian.vo.CustomerManagementVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface CustomerManagementMapper extends SuperMapper<CustomerManagement> {
    List<CustomerManagementVo> findCustomerListPage(Page page, CustomerManagementDto customerManagementDto, @Param("companyId") String companyId);

    CustomerManagementVo getCustomerById(@Param("baseId") String baseId);

    List<Map> getCustomerCountByEmployee(@Param("enterpriseId") String enterpriseId,@Param("userId")String userId);

    Map getCustomTotal(@Param("enterpriseId") String enterpriseId,@Param("userId")String userId);

    List<CustomerManagementVo> selectCustomerList(@Param("customerManagementDto") CustomerManagementDto customerManagementDto, Page<CustomerManagementVo> page);

    CustomerManagementVo selectCustomerById(@Param("baseId") String baseId);

    CustomerManagementVo selectCustomerDetails(@Param("baseId") String baseId);

    String queryCustomerCountBySupplyId(@Param("supplyId") String supplyId, @Param("companyId")String companyId);

    Integer queryCustomerCountByEnterpriseId(@Param("enterpriseId") String enterpriseId, @Param("entname") String entname);

    int queryCustomerCountByEnterpriseName(@Param("name") String name, @Param("companyId") String companyId);
}